import request from '@/utilities/request';
import { special_instance as srequest } from '@/utilities/request';

export const appUserForgetPasswdVerifyCodeMailService = (reqData) =>
  request.post('/api/AppUser/SendForgetPasswdVerifyCodeMail', reqData);

export const appUserResetPasswdService = (reqData) =>
  request.post('/api/AppUser/ResetAppUserPassword', reqData);

export const appUserRegisterVerifyCodeMailService = (reqData) =>
  request.post('/api/AppUser/SendRegisterVerifyCodeMail', reqData);

export const appUserRegisterService = (reqData) =>
  request.post('/api/AppUser/CreateUser', reqData);

export const appUserLoginService = (reqData) =>
  srequest.post('/api/AppUser/AppUserLogin', reqData);

export const appUserCAPTCHARefreshService = (reqData) =>
  srequest.post('/api/AppUser/RefreshCAPTCHA', reqData);

export const appUserGetInfoService = () =>
  request.post('/api/AppUser/GetAppUserInfo');

export const appUserSetInfoService = (reqData) =>
  request.post('/api/AppUser/SetAppUserInfo', reqData, {
    headers: { 'Content-Type': 'multipart/form-data' }
  });

export const appUserRefreshTokenService = (reqData) =>
  request.post('/api/AppUser/RefreshToken', reqData);

export const fetchUserPermission = (reqData) =>
  request.post('/api/AppPermission/FetchUserPermission', reqData);

export const appUserChangePasswordService = (reqData) =>
  request.post('/api/AppUser/ChangeAppUserPassword', reqData);
